﻿<UserControl x:Class="Reveil.Controls.Pomodoro"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:controls="clr-namespace:Reveil.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BoolVisibilityConverter" />
    </UserControl.Resources>
    <Grid Background="{StaticResource ResourceKey=ControlBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <controls:ReveilClock HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Time="{Binding Path=Time,Mode=TwoWay}" StrokeThickness="30"/>
        <TextBlock Grid.Row="1" Text="{Binding Path=Time,StringFormat=HH:mm:ss}" FontWeight="Light" FontSize="52" HorizontalAlignment="Center"/>
        <Grid Grid.Row="2" Visibility="{Binding IsPomodoroMode,Converter={StaticResource ResourceKey=BoolVisibilityConverter}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button Content="Pomodoro" Command="{Binding Path=PomodoroCommand}"/>
            <Button Grid.Column="1" Content="Short break" Command="{Binding Path=ShortBreakCommand}"/>
            <Button Grid.Column="2" Content="Long break" Command="{Binding Path=LongBreakCommand}"/>
            <Button Background="Red" Grid.Column="3" Content="Stop" Command="{Binding Path=StopCommand}"/>
        </Grid>
        <MediaElement Grid.Row="3" x:Name="meAlarm" Source="{Binding Path=MusicPath}" LoadedBehavior="Manual" />
    </Grid>
</UserControl>